<template>
	<view class="page-body pd40">
  <!--     <view class="p">密码须包含数字，字母，符号中至少2种元素</view>
       <view class="p">密码长度需要6~12位</view> -->
		<view class="form ">
			<view class="input-row password">
				<view class="flex0 input-left">旧密码</view>
				<input :type="inputType" placeholder="输入旧密码" @input="bindpwd" placeholder-style="color:#929292" maxlength="12"  />
				<view @click.stop="showPwd" class="pwd-eyes">
					<img src="/static/img/icon/eyes.png" alt="" class="uni-icon-eye" v-if="inputType=='password'" >
					<img src="/static/img/icon/eyes_on.png" alt="" class="uni-icon-eye" v-else >
				</view>
			</view>
			<view class="input-row password">
				<view class="flex0 input-left">新密码</view>
				<input :type="inputType" placeholder="输入新密码" @input="bindpwd" placeholder-style="color:#929292" maxlength="12"  />
				<view @click.stop="showPwd" class="pwd-eyes">
					<img src="/static/img/icon/eyes.png" alt="" class="uni-icon-eye" v-if="inputType=='password'" >
					<img src="/static/img/icon/eyes_on.png" alt="" class="uni-icon-eye" v-else >
				</view>
			</view>
			<view class="input-row password">
				<view class="flex0 input-left">确认密码</view>
				<input :type="inputType" placeholder="输入再次输入密码" @input="bindpwd" placeholder-style="color:#929292" maxlength="12"  />
				<view @click.stop="showPwd" class="pwd-eyes">
					<img src="/static/img/icon/eyes.png" alt="" class="uni-icon-eye" v-if="inputType=='password'" >
					<img src="/static/img/icon/eyes_on.png" alt="" class="uni-icon-eye" v-else >
				</view>
			</view>
			<view class="btn" @click="doReg">确认修改</view>
		</view>
		
	</view>
</template>

<script>
	var that;
	import {isPoneAvailable,TimeStorage,trim} from '@/utils/utils.js';
	import {
	    mapState,
	    mapMutations
	} from 'vuex'	
	import md5 from "@/common/SDK/md5.min.js";
	export default {
		data() {
			return {
				phoneNumber:"",
				code:'',
				passwd:"",
				inputType:"password",
				getCodeText:'获取验证码',
				getCodeBtnColor:"#222",
				getCodeisWaiting:false,
				svgCode:"",
				imgcode:"",
				inviteCode:"",
				ctoken:"",
				Timer:"",
				isNextStep:false
			}
		},
		onLoad() {
			that = this;
		},
		methods: {
			bindpwd(e){
				let value = e.detail.value;
				this.passwd = value;
			},
			showPwd(){
				if(this.inputType=="password"){
					this.inputType="text"
				}else{
					this.inputType="password"
				}
			}
		},
		onUnload() {
			that = null;
			
		}
	}
</script>

<style lang="scss">
	@import "../../../../static/css/login.scss";
	.get-imgcode{background: #ccc;width: 110upx;}
	.protocol{
		line-height: 60upx;
		justify-content:center;
		text{color: #007AFF;}
	}
	.form .btn{
		margin-top: 100upx;
	}
</style>
